import { Component, Vue } from 'vue-facing-decorator';
import { PageWrapper } from '@/components/Page';
import { useGo } from '@/hooks/web/usePage';
import { useRoute } from 'vue-router';
import { ref } from 'vue';
import { Tabs } from 'ant-design-vue';
import { useTabs } from '@/hooks/web/useTabs';

/**
 * @program: microservice-central-portal
 * @description: 系统账号管理部门
 * @author: baiHoo.chen
 * @create: 2022年5月24日
 **/
@Component({
  name: 'AccountDetail',
  components: { PageWrapper, ATabs: Tabs, ATabPane: Tabs.TabPane },
})
export default class AccountDetail extends Vue {
  route = useRoute();
  go = useGo();
  userId = ref(this.route.params?.id);
  currentKey = ref('detail');
  mounted() {
    const { setTitle } = useTabs();
    setTitle('详情：用户' + this.userId.value).then();
  }
  goBack() {
    // 本例的效果时点击返回始终跳转到账号列表页，实际应用时可返回上一页
    this.go('/system/account');
  }
}
